<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: CaffePreproccessor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.05</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1graph__utils_1_1_caffe_preproccessor.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">CaffePreproccessor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Caffe preproccessor.  
 <a href="classarm__compute_1_1graph__utils_1_1_caffe_preproccessor.xhtml#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for CaffePreproccessor:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1graph__utils_1_1_caffe_preproccessor__coll__graph.svg" width="158" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.xhtml">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a60e1354276a6ffd7359634e1ab464cff"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_caffe_preproccessor.xhtml#a60e1354276a6ffd7359634e1ab464cff">CaffePreproccessor</a> (std::array&lt; float, 3 &gt; mean=std::array&lt; float, 3 &gt;{{0, 0, 0}}, bool bgr=true)</td></tr>
<tr class="memdesc:a60e1354276a6ffd7359634e1ab464cff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default Constructor.  <a href="#a60e1354276a6ffd7359634e1ab464cff">More...</a><br /></td></tr>
<tr class="separator:a60e1354276a6ffd7359634e1ab464cff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1545d087d050b8e9733e7e212df73666"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_caffe_preproccessor.xhtml#a1545d087d050b8e9733e7e212df73666">preprocess</a> (<a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> &amp;tensor) override</td></tr>
<tr class="memdesc:a1545d087d050b8e9733e7e212df73666"><td class="mdescLeft">&#160;</td><td class="mdescRight">Preprocess the given tensor.  <a href="#a1545d087d050b8e9733e7e212df73666">More...</a><br /></td></tr>
<tr class="separator:a1545d087d050b8e9733e7e212df73666"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml">IPreprocessor</a></td></tr>
<tr class="memitem:a145ae89877c556306c3b0a8d869b33f3 inherit pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml#a145ae89877c556306c3b0a8d869b33f3">~IPreprocessor</a> ()=default</td></tr>
<tr class="memdesc:a145ae89877c556306c3b0a8d869b33f3 inherit pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor.  <a href="#a145ae89877c556306c3b0a8d869b33f3">More...</a><br /></td></tr>
<tr class="separator:a145ae89877c556306c3b0a8d869b33f3 inherit pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Caffe preproccessor. </p>

<p>Definition at line <a class="el" href="_graph_utils_8h_source.xhtml#l00057">57</a> of file <a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a60e1354276a6ffd7359634e1ab464cff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1graph__utils_1_1_caffe_preproccessor.xhtml">CaffePreproccessor</a> </td>
          <td>(</td>
          <td class="paramtype">std::array&lt; float, 3 &gt;&#160;</td>
          <td class="paramname"><em>mean</em> = <code>std::array&lt;float,&#160;3&gt;&#160;{&#160;{&#160;0,&#160;0,&#160;0&#160;}&#160;}</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bgr</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mean</td><td>Mean array in RGB ordering </td></tr>
    <tr><td class="paramname">bgr</td><td>Boolean specifying if the preprocessing should assume BGR format </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_graph_utils_8cpp_source.xhtml#l00071">71</a> of file <a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a>.</p>

<p>References <a class="el" href="_simple_tensor_8h_source.xhtml#l00422">arm_compute::test::swap()</a>.</p>
<div class="fragment"><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    : _mean(mean), _bgr(bgr)</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordflow">if</span>(_bgr)</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    {</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <a class="code" href="namespacearm__compute_1_1test.xhtml#a28edc8880596d14c099f3c2509efc8b3">std::swap</a>(_mean[0], _mean[2]);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    }</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_xhtml_a28edc8880596d14c099f3c2509efc8b3"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a28edc8880596d14c099f3c2509efc8b3">arm_compute::test::swap</a></div><div class="ttdeci">void swap(SimpleTensor&lt; U &gt; &amp;tensor1, SimpleTensor&lt; U &gt; &amp;tensor2)</div><div class="ttdef"><b>Definition:</b> <a href="_simple_tensor_8h_source.xhtml#l00422">SimpleTensor.h:422</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a1545d087d050b8e9733e7e212df73666"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void preprocess </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> &amp;&#160;</td>
          <td class="paramname"><em>tensor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Preprocess the given tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">tensor</td><td><a class="el" href="classarm__compute_1_1_tensor.xhtml" title="Basic implementation of the tensor interface. ">Tensor</a> to preprocess. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml#ae699b63165de5182fda5a2337009641f">IPreprocessor</a>.</p>

<p>Definition at line <a class="el" href="_graph_utils_8cpp_source.xhtml#l00080">80</a> of file <a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a>.</p>

<p>References <a class="el" href="_helpers_8inl_source.xhtml#l00122">arm_compute::execute_window_loop()</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">ITensor::info()</a>, <a class="el" href="_i_tensor_8h_source.xhtml#l00063">ITensor::ptr_to_element()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="_window_8inl_source.xhtml#l00240">Window::use_tensor_dimensions()</a>.</p>
<div class="fragment"><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;{</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    Window window;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    window.use_tensor_dimensions(tensor.info()-&gt;tensor_shape());</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> Coordinates &amp; <span class="keywordtype">id</span>)</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    {</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">float</span> value                                     = *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span> *<span class="keyword">&gt;</span>(tensor.ptr_to_element(<span class="keywordtype">id</span>)) - _mean[<span class="keywordtype">id</span>.z()];</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span> *<span class="keyword">&gt;</span>(tensor.ptr_to_element(<span class="keywordtype">id</span>)) = value;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    });</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;}</div><div class="ttc" id="namespacearm__compute_xhtml_a6c0dcc38187027dcb89cd9724bc5a823"><div class="ttname"><a href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &amp;w, L &amp;&amp;lambda_function, Ts &amp;&amp;...iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00122">Helpers.inl:122</a></div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>utils/<a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a></li>
<li>utils/<a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1graph__utils.xhtml">graph_utils</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1graph__utils_1_1_caffe_preproccessor.xhtml">CaffePreproccessor</a></li>
    <li class="footer">Generated on Wed May 23 2018 11:36:43 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
